home *** CD-ROM | disk | FTP | other *** search
- # Jedi Knight Cog Script
- #
- # ITEM_BACTA.COG
- #
- # INVENTORY script - Bacta Tank
- #
- # [CYW & YB]
- #
- # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
- # ========================================================================================
-
- symbols
-
- sound bactaSnd=NRG00tBattUse.WAV
- thing player
-
- message startup
- message activated
-
-
- end
-
- # ========================================================================================
-
- code
- startup:
- player=getlocalplayerthing();
- maxhealth=getthinghealth(player);
- damageuse=maxhealth-5;
- return;
-
- activated:
- if(GetInv(player, 15) > 0.0)
- {
- if(GetThingHealth(player) < damageuse)
- {
- Print("Using Bacta");
-
- if (dwcheckDroidCaps(1048576)!=0) dwplayplayerspeech("", 500);
-
- playsoundlocal(bactaSnd, 1.0, 0.0, 0);
- HealThing(player, 30.0);
- ChangeInv(player, 15, -1.0);
- if(GetInv(player, 15) == 0) SetInvAvailable(player, 15, 0);
- }
- else dwplaycammyspeech(99999, "ghca056.wav", 5, 1); //inclines
- }
-
- Return;
-
- end
-